package any.functor.impl.pred;

import java.util.Map.Entry;

import any.ImmutableAny;
import any.functor.interfaces.PrimitiveFunctionTypedPredicate;
import any.functor.interfaces.TargetTypedFunction;

public abstract class BaseFunctionTypedPredicate<T, A> 
	extends BasePredicateWithDescription<Entry<String, ? extends ImmutableAny>> 
	implements PrimitiveFunctionTypedPredicate<T, A> {
	
	private final TargetTypedFunction<ImmutableAny, T> asFunction;

	public BaseFunctionTypedPredicate(TargetTypedFunction<ImmutableAny, T> asFunction) {
		this("Overwrite toString!", asFunction);
	}
	public BaseFunctionTypedPredicate(String description, TargetTypedFunction<ImmutableAny, T> asFunction) {
		super(description);
		this.asFunction = asFunction;
	}

	public TargetTypedFunction<ImmutableAny, T> getAsFunction() {
		return asFunction;
	}
	
}
